package com.bw.mallshop.dao;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import com.bw.mallshop.entity.CarListEntity;
import com.bw.mallshop.entity.UserEntityValues;

import java.util.List;

import io.reactivex.Maybe;

@Dao
public interface CarDao {

    //添加购物车数据方法
    @Insert
    void insertCar(CarListEntity.Values values);
    //查询购物车数据方法
    @Query("SELECT * from `values`")
    Maybe<List<CarListEntity.Values>> queryCarList();
    @Query("SELECT * from `values`")
    List<CarListEntity.Values> queryCarLocalList();
    //修改购物车数据方法
    @Update
    void update(CarListEntity.Values values);
    //清空购物车
    @Query("Delete from `values`")
    void delete();
}
